/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package test_system.questions;

/**
 *
 * @author root
 */
public class QuestionWrapper {
    private Question question;

    public QuestionWrapper(Question question){
        this.question = question;
    }
    
    public Answer getAnswerById(int i){
        return ((CheckAnswerQuestion) question).getVarById(i);
    }
    
    public String getClassName(){
        if(question instanceof TextAnswerQuestion){
            return "TextAnswerQuestion";
        }else if(question instanceof CheckAnswerQuestion){
            return "CheckAnswerQuestion";
        }else{
            throw new UnsupportedOperationException("Not supported yet.");
        }        
    }
    
    public Answer getRigthAnswer(){
        return question.getRightAnswer();
    }
    
    
    public String getRigthAnswerToCheck(){
        return question.getRightAnswerToCheck();
    }

    @Override
    public String toString() {
        return question.toString();
    }

    public String toWrite(){
        return question.toWrite();
    }
    /**
    *  add   getQuestionsLevel
    */
    public String getQuestionsLevel() {
        return question.getQuestionLevel();
    }

    public Object getQuestionsTeam() {
        return question.getQuestionTheme();
    }
}
